home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / 32URDOOR.ZIP / DOOR.PAS next >
Pascal/Delphi Source File  |  1994-11-09  |  2KB  |  83 lines

  1.  
  2. Program Door_test;
  3.  
  4. {$M $4000,0,0}
  5. {$F+}
  6. {$X+}
  7.  Uses Urdoor;
  8.  Var
  9.   I : Integer;
  10.   S : String;
  11.   C : Char;
  12.   X,Y : Byte;
  13.   f,b : Byte;
  14. (*-------------------------------------------------------------------------*)
  15. (* CenterTxt                                                               *)
  16. (*                                                                         *)
  17. (*-------------------------------------------------------------------------*)
  18. Function CenterTxt(Old: String): String;
  19. Var
  20.  Temp2: longInt;
  21.  I    : Shortint;
  22. Begin
  23.   If Length(old) >= 80 then Delete(Old,81,255)
  24.   else
  25.    Begin
  26.     Temp2 := Round((80-Length(Old))/2);
  27.     For I := 1 to Temp2 do Insert(' ',Old,1);
  28.    end;
  29.   Centertxt := Old
  30. End;
  31.  
  32. Begin
  33.  URsetcolor(2,0);
  34.  URwriteln(Centertxt('URDoor Demo'));
  35.  URsetcolor(14,0);
  36.  URwriteln(Centertxt('-Hit Any Key to Continue-'));c := URreadkey;
  37.  URdisplayfile('Files.bbs',true);
  38.  URSetcolor(10,0);
  39.  UrWrite('Hit Any Key to Refresh Screen');C := URreadkey;
  40.  URrefreshscreen;
  41.  URWrite(#13#27+'[0K');
  42.  URsetcolor(10,0);
  43.  URwrite('Screen Refreshed -Hit Any Key to Continue-');c := URreadkey;
  44.  URCls;
  45.  URsetcolor(12,0);
  46.  URwriteln(Centertxt('File  Display'));
  47.  URsetcolor(9,0);
  48.  URwrite(Centertxt('Press Any Key to Display File'));C := URreadkey;
  49.  If ANSi Then URDisplayfile('GOlf.ans',True) Else URDisplayFile('Golf.asc',False);
  50.   URwrite(Centertxt('Press Any Key to Continue'));C := URreadkey;
  51.  urcls;
  52.  URwrite(Centertxt('Goto Test'));
  53.  Randomize;
  54.  For I := 1 to 30 do
  55.  Begin
  56.   x := Random(79) + 1;
  57.   y := Random(22) + 2;
  58.   b := Random(7);
  59.   f := Random(15);
  60.   URSetcolor(f,b);
  61.   URgotoXY(x,y);
  62.   URWRITE('*');
  63.  End; (*FOR I*)
  64.  
  65.  URsetcolor(14,0);
  66.  URgotoxy(54,24);
  67.  URwrite('- Press any key -');C := urreadkey;
  68.  URcls;
  69.  URsetcolor(4,0);
  70.  URgotoxy(5,15);
  71.  URwrite('Enter a string >');
  72.  URsetcolor(14,0);
  73.  S := urreadstr;
  74.  URgotoxy(5,16);
  75.  URwrite('Here'+#39+'s your string ');
  76.  URsetcolor(4,0);
  77.  URwrite(S);
  78.  URgotoxy(0,22);
  79.  URsetcolor(24,0);
  80.  URwrite('Thats all folks HIT a key');
  81.  C := urreadkey;
  82.  Begin End;
  83. End.